package com.guoli.sms.dao;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

import com.guoli.sms.vo.Dept;

public interface IDeptDao {
	
	/**
	 * 查询所有部门
	 * @param conn
	 * @return
	 * @throws SQLException
	 */
	public List<Dept> getDepts(Connection conn) throws SQLException;
	
	/**
	 * 通过ID查询部门
	 * @param id
	 * @param conn
	 * @return
	 * @throws SQLException
	 */
	public Dept getDeptById(int id, Connection conn) throws SQLException;
	
	/**
	 * 添加部门
	 * @param d_name
	 * @param conn
	 * @throws SQLException
	 */
	public void addDept(String d_name, Connection conn) throws SQLException;
	
	/**
	 * 通过名称查部门
	 * @param d_name
	 * @param conn
	 * @return
	 * @throws SQLException
	 */
	public int getDeptByName(String d_name, Connection conn) throws SQLException;
	
	
}	
